home *** CD-ROM | disk | FTP | other *** search
- # showlist <list of items>
- #
- # Comments:
- # This is apparently an intellectual exercise, as this is most certainly
- # not the "best" way to do this, by any modern measure. However, it does
- # demonstrate that it is possible to use a counter to iterate through the
- # argument list in a useful manner without using recursion of any kind.
- #
- alias showlist {
- @ sl.cnt = 0
- while (sl.wrd = [$($sl.cnt)])
- {
- echo $sl.wrd
- @sl.cnt++
- }
- ^assign -sl.cnt
- ^assign -sl.wrd
- }
- #Ian Frechett
-